package com.zqx.pojo;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Laoshi entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "LAOSHI", schema = "AJWXJK")
@org.hibernate.annotations.Entity(dynamicInsert=true)
@SequenceGenerator(name="SEQ", sequenceName="TEST_SEQ",allocationSize=1)
public class Laoshi implements java.io.Serializable {

	// Fields

	private long lid;
	private String lname;
	private int lage;
	private Set<Laoxue> laoxues = new HashSet<Laoxue>(0);



	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ")
	@Column(name = "LID", unique = true, nullable = false, precision = 22, scale = 0)
	public long getLid() {
		return this.lid;
	}

	public void setLid(long lid) {
		this.lid = lid;
	}

	@Column(name = "LNAME", length = 12)
	public String getLname() {
		return this.lname;
	}

	public void setLname(String lname) {
		this.lname = lname;
	}

	@Column(name = "LAGE", precision = 22, scale = 0)
	public int getLage() {
		return this.lage;
	}

	public void setLage(int lage) {
		this.lage = lage;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY,mappedBy="laoshi")
	@JoinColumn(name="LID")
	public Set<Laoxue> getLaoxues() {
		return laoxues;
	}

	public void setLaoxues(Set<Laoxue> laoxues) {
		this.laoxues = laoxues;
	}
	
	

}